package week12.config;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @author lfy
 */
@Component
public class MqReceiver {


    /**
     * 监听01
     */
    @JmsListener(destination = "week12.topic06.queue")
    public void getQueue(String info) {
        System.out.println("queue:"+info);
    }
    /**
     * 监听01
     */
    @JmsListener(destination = "week12.topic06.topic")
    public void getTopic(String info) {
        System.out.println("topic:"+info);
    }



}
